package com.xialinrui.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xialinrui.dto.TodoDto;
import com.xialinrui.entity.Affair;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author xialinrui
 */
@Mapper
@Repository
public interface AffairMapper extends BaseMapper<Affair> {
    void addTodoToAffair(@Param("affair_id") Long affairId, @Param("todo_id") Long todoId);

    void deleteAffair(@Param("affair_id") Long affairId, @Param("todo_id") Long todoId);

    List<TodoDto> selectAllTodosByAffairId(@Param("affair_id") Long affairId);
}
